﻿// -----------------------------------------------------------------------
// <copyright file="ICommandHandler.cs">
// Copyright (c) 2013 Andrey Veselov. All rights reserved.
// License:  Microsoft Public License (MS-PL)
// Contacts: http://andrey.moveax.com  andrey@moveax.com
// </copyright>
// -----------------------------------------------------------------------

namespace Moveax.DataAccess.Cqrs
{
    using System.Diagnostics.Contracts;
    using Moveax.DataAccess.Cqrs.Contracts;

    /// <summary>Command handler for the command of the TCommand type.</summary>
    /// <typeparam name="TCommand">The type of the command.</typeparam>
    [ContractClass(typeof(CommandHandlerSyncContract<>))]
    public interface ICommandHandlerSync<in TCommand> : ICommandHandler<TCommand>
        where TCommand : class, ICommand
    {
        /// <summary>Executes the specified command.</summary>
        /// <param name="command">The command.</param>
        void Execute(TCommand command);
    }
}